home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / master / valid_write < prev   
Text File  |  2001-04-06  |  2KB  |  46 lines

  1. SYNOPSIS
  2.         string valid_write(string path, string uid, string func, object ob)
  3.  
  4. DESCRIPTION
  5.         This function is called to check if the object ob with the
  6.         user-id uid has write permissions to the file given by path
  7.         for the operation named by func. It should return 0 if
  8.         permission is denied, or the normalized path if permission is
  9.         granted. You can also return 1 to indicate that the path can
  10.         be used unchanged.
  11.  
  12.         The returned pathname must not contain ``..'', a leading /
  13.         will be stripped by the interpreter.
  14.  
  15.         Func denotes the efun call or other operation that caused
  16.         valid_write() to be called:
  17.  
  18.           copy_file (for the target file or directory name)
  19.           rename_from (efun rename(), for the original name)
  20.           rename_to   (efun rename(), for the new name)
  21.           ed_start (whenever the builtin ed tries to write to a file),
  22.           mkdir,
  23.           objdump
  24.           opcdump
  25.           remove_file (efun rm()),
  26.           rmdir,
  27.           save_object,
  28.           write_bytes,
  29.           write_file.
  30.  
  31.         For save_object(), the <path> passed is the filename as given
  32.         in the efun call. If for this efun a filename ending in ".c" is
  33.         returned, the ".c" will be stripped from the filename.
  34.  
  35.         This function is called in compat mode as well. If
  36.         you need to be compatible with the old 2.4.5-mudlib, redirect
  37.         these calls to the valid_read/valid_write in the user
  38.         object.
  39.  
  40. HISTORY
  41.         LDMud 3.2.8 adds operation "copy_file", and replaces "do_rename"
  42.         by "rename_from" and "rename_to".
  43.  
  44. SEE ALSO
  45.         valid_read(M), make_path_absolute(M)
  46.